home *** CD-ROM | disk | FTP | other *** search
/ Family Forum 257 / SOMC Family Forum 257 - Disc 1.iso / somc / WordWise.dir / 00001_Script_1 next >
Text File  |  1998-10-27  |  5KB  |  195 lines

  1.  
  2. on startMovie
  3.   
  4.   --* set the paths and exe for the setups
  5.   
  6.   global E1SETUP,E2SETUP,E3SETUP,E4SETUP,INSTALL1, INSTALL2
  7.   set E1SETUP to "@\SETUP.EXE" --ADAM
  8.   set E2SETUP to "@\SETUP.EXE" --algebra
  9.   set E3SETUP to ""
  10.   set E4SETUP to ""
  11.   
  12.   set INSTALL1 to "@\DX5ENG.EXE"
  13.   set INSTALL2 to "@\SETUP1.EXE"  
  14.   
  15.   
  16.   
  17.   --* set weblink URLs
  18.   
  19.   global LINK1,LINK2,LINK3,LINK4,LINK5,LINK6,LINK7,LINK8,LINK9,LINK10
  20.   set link1 to "http://www.woodberry.org/acad/hist/FRWEB/index.htm"
  21.   set link2 to "http://users.massed.net/~mdurant/AncientEgyptWebquest.htm"
  22.   set link3 to "http://www.finaid.org"
  23.   set link4 to "http://www.ucla.edu/"
  24.   set link5 to "http://www.clet.ait.ac.th/el21open.htm"
  25.   set link6 to "http://www.biochemist.com/"
  26.   set link7 to "http://www.intellicast.com/"
  27.   set link8 to "http://libertyonline.hypermall.com/index.html"
  28.   set link9 to "http://www.quoteland.com/"
  29.   set link10 to "http://www.unc.edu/~rowlett/units/index.html"
  30.   
  31.   
  32.   
  33.  
  34.   
  35.   glowClear()
  36.   --* turn on altglows
  37.   glow(60,TRUE)
  38. end
  39.  
  40.  
  41.  
  42.  
  43. --* This handler hides/shows the glow images. eg: glow(5,TRUE) *
  44.  
  45. on glow WHICHSPRITE, TRUEORFALSE
  46.   set the visible of sprite WHICHSPRITE to TRUEORFALSE
  47. end glow
  48.  
  49. --* TURN OF ALL GLOWS ON START
  50. on glowClear
  51.   repeat with i = 50 to 65
  52.     glow(i)
  53.   end repeat
  54. end
  55.  
  56. --* This handler switches the text color for a glow effect. eg.textglow("Hello",1)*
  57.  
  58. on textglow WHICHMEMBER, COLORNUMBER
  59.   set the foreColor of member WHICHMEMBER to COLORNUMBER  
  60. end textglow
  61.  
  62. --* This is for using a HotSpot or Button for closing the window or a overlaid
  63. --* cover up sprite THIS IS AN EXAMPLE NOT A HANDLER
  64.  
  65. --on mouseUp
  66. --  global  enableHotspots
  67. --  doClick()
  68. --  if (the visible of sprite 35) then
  69. --    hideFonts()
  70. --    restoreBI()
  71. --  else
  72. --    close window "BIART"
  73. --    forget window "BIART"
  74. --    tell the stage to enableHotspots()
  75. --  end if
  76. --end mouseUp
  77.  
  78. --* THIS HANDLER EXAMPLE OF DISABLEING HOTSPOTS WHEN RUNNING MIAW*
  79. --on mouseEnter
  80. --  if not count(the windowList) then
  81. --    doRollover(52)
  82. --  end if
  83. --end
  84. --
  85. --
  86. --on mouseLeave
  87. --  if not count(the windowList) then
  88. --    doRollout(52)
  89. --  end if
  90. --end
  91.  
  92.  
  93.  
  94. --* THIS HANDLER OPEN AND CENTERS A MOVIE IN A WINDOW *
  95.  
  96. on openMIAW MYWINDOW
  97.   set myRect=the rect of window MYWINDOW
  98.   set myStage=the rect of the Stage
  99.   set myWidth=(getAt(myRect,3)-getAt(myRect,1))
  100.   set myHeight=(getAt(myRect,4)-getAt(myRect,2))
  101.   set myLocH=((getAt(myStage,3)+getAt(myStage,1))/2)-(myWidth/2)
  102.   set myLocV=((getAt(myStage,2)+getAt(myStage,4))/2)-(myHeight/2)
  103.   set myNewRect=rect(myLocH,myLocV,(myLocH+myWidth),(myLocV+myHeight))
  104.   set the rect of window MYWINDOW=myNewRect
  105.   set the windowType of window MYWINDOW to 2
  106.   open window MYWINDOW
  107. end openMIAW
  108.  
  109.  
  110. --* THESE HANDLERS TURN ON A GLOW, TURN POINTER A HAND AND PLAYS A SOUND *
  111. --
  112. --on doRollover numsprite
  113. --  glow(numsprite,TRUE)
  114. --  global finger,fingermask
  115. --  cursor[finger,fingermask]
  116. --  updatestage
  117. --  puppetsound 1, "rollsound"
  118. --  --  repeat while soundbusy(1)
  119. --  --  end repeat
  120. --end
  121.  
  122.  
  123.  
  124.  
  125. --* THIS HANDLER TURNS THE SPRITE PASSED TO IT TO INVISIBLE AND RESETS THE CURSOR
  126. on doRollout numsprite
  127.   glow(numsprite,FALSE)
  128.   cursor 0
  129. end
  130.  
  131. --* PLAYS A CLICK SOUND
  132.  
  133. on doClick
  134.   puppetsound 1,"clicksound"
  135.   updateStage
  136. end
  137.  
  138. --* CHECK THE ANSWER FOR WORDWIZE
  139.  
  140. on  checkAnswer 
  141.   
  142.   global CORRECT,Ncount,ANSWER,TRIES,RIGHT
  143.   
  144.   put line Ncount of the text of member "ww3" into member "definition" 
  145.   set the fontSize of member "definition" to 18
  146.   set the fontstyle of member "definition" to "bold" 
  147.   glow(20,TRUE)
  148.   set TRIES to TRIES + 1
  149.   if answer = CORRECT then 
  150.     glow(52,TRUE)
  151.     puppetsound 1,"Woww1"
  152.     updateStage
  153.     set RIGHT to RIGHT + 1
  154.   else 
  155.     glow(53,TRUE)
  156.     puppetsound 1,"Buzzer2"
  157.     updateStage
  158.   end if
  159. end
  160.  
  161. on finish
  162.   
  163.   global TRIES,RIGHT,scoreSTR
  164.   
  165.   go to "FIN"
  166.   if (TRIES) THEN
  167.     if ((float(RIGHT) / float(TRIES)) > .49) then
  168.       puppetsound 1,"Glfclap1"
  169.       updateStage
  170.     end if
  171.   end if
  172.   set scoreSTR2 to "YOU GOT"&&string(RIGHT)&&"OUT OF"&&string(TRIES)&&"RIGHT"
  173.   set the text of member "scoreSTR" to scoreSTR2
  174.   updateStage
  175.   
  176. end
  177.  
  178.  
  179.  
  180. on doRollover numsprite,SOUNDNUM
  181.   glow(numsprite,TRUE)
  182.   global finger,fingermask
  183.   cursor[finger,fingermask]
  184.   updatestage  
  185.   case SOUNDNUM of
  186.     1:
  187.       puppetsound 1, "rollsound"
  188.       --  repeat while soundbusy(1)
  189.       --  end repeat
  190.     2:
  191.       puppetsound 1, "rollsound2"
  192.       --  repeat while soundbusy(1)
  193.       --  end repeat      
  194.   end case  
  195. end